﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SpeakupBackend.Classes
{
    public enum ClassStatus
    {
        Attended,
        Missed,
        Cancelled,
        Reserved,
        ReservedWaitList,
        Available,
        AvailableWaitList,
        Unknown
    }
    
    public static class ClassStatusExtensions
    {
        static public bool IsPast(this ClassStatus status)
        {
            return status == ClassStatus.Attended ||
                   status == ClassStatus.Missed ||
                   status == ClassStatus.Cancelled;
        }

        static public bool IsFuture(this ClassStatus status)
        {
            return status == ClassStatus.Reserved ||
                   status == ClassStatus.ReservedWaitList ||
                   status == ClassStatus.Available ||
                   status == ClassStatus.AvailableWaitList;
        }

        static public bool IsReserved(this ClassStatus status)
        {
            return status == ClassStatus.Reserved ||
                   status == ClassStatus.ReservedWaitList;
        }

        static public bool IsAvailable(this ClassStatus status)
        {
            return status == ClassStatus.Available ||
                   status == ClassStatus.AvailableWaitList;
        }
    }
}
